package com.example.Hongbao;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class MyActivity extends Activity {
    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    /**
     * 打开系统设置中辅助功能
     *
     * @param view
     */
    public void start(View view) {
        UpdateManager.openServer(this, getResources().getString(R.string.app_name));
    }


    public void startApp(View view) {
        UpdateManager.startUpdate(this);
    }

    /**
     * @param view
     */
    public void isOpenService(View view) {
        boolean enabled = AccessServiceManager.isAccessibilityEnabled(MyApplication.getInstance());
        Toast.makeText(this, "开启=" + enabled, Toast.LENGTH_SHORT).show();
    }
}
